package com.deer.wms.ware.task.service;

import com.deer.wms.base.system.model.BillOutDetailBO;
import com.deer.wms.inventory.model.Inventory.Inventory;
import com.deer.wms.project.root.service.SuperService;
import com.deer.wms.ware.task.model.Return.SoLogItemDto;
import com.deer.wms.ware.task.model.SO.SoDayList;
import com.deer.wms.ware.task.model.SO.SoDetail;
import com.deer.wms.ware.task.model.SO.SoDetailCriteria;
import com.deer.wms.ware.task.model.SO.SoDetailDto;
import com.deer.wms.ware.task.model.SO.vo.SoDetailVo;

import java.util.List;


/**
 * Created by guo on 2020/02/02.
 */
public interface SoDetailService extends SuperService<SoDetail> {

    List<SoDetailDto> findList(SoDetailCriteria criteria);
    List<SoDetailDto> findBaoKuanByItemCode(String itemCode,Integer wareId,Integer orgId);

    List<SoDetail> findByBillNo(String billNo);

    /**
     * 查询所有未完全分配的SO明细
     * @return List<SoDetailDto>
     */
    List<SoDetailDto> findUndistributedSoDetail(Integer soType);

    List<SoDetail> findByMasterId(Integer soId);

    List<SoDayList> findDayList(SoDetailCriteria criteria);

    List<SoLogItemDto> findLogItemsByBillNos(List<String> billNos);

    List<SoDetailDto> findDetailsByWaveId( Integer wareId,  Integer waveId);


    /**
     * 查询借料项 全部项
     * @param billNo
     * @return
     */
    SoDetailVo findAll(String billNo);

    /**
     * 查询可借料项,全部项
     * @param billNo
     * @param itemCode
     * @return
     */
    List<BillOutDetailBO> beBeing(String billNo, String itemCode);

    public List<SoDetail> lendDetail(List<SoDetail> list);

    public Double putNumber(List<Inventory> inventoryList, String itemCode, Integer organizationId);
}
